import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/vue-admin-template/user/login',
    method: 'post',
    data
  })
}

//分页+条件 查询用户列表
export function searchList(data,page,size) {
  return request({
    url: `/findPage?page=${page}&size=${size}`,
    method: 'post',
    data
  })
}


//添加保存的api
export function save(data) {
  return request({
    url: `/save`,
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
